<?php session_start(); ?><html>
<head></head>
<body>
    <?php include('sql_contratos.php'); if($totalRows_detalles>0){ ?>
<p><span style="text-align:center;" class="ui-widget-header">Por favor, haga clic en Nro. de contrato para ver o imprimir.</span></p>
<div id="detalle">
           <form id="frm_contrato1" name="frm_contrato1" method="post" action="">
<table cellspacing="3" width="456">
<tr>
		<td class='tituloTabla'>N</td>
		<td class='tituloTabla'>Nro. Contrato</td>
		<td width="145" class='tituloTabla'>Art&iacute;culo</td>
		<td width="118" class='tituloTabla'>Monto</td>
   		<td width="20" class='tituloTabla'>&nbsp;</td>
</tr>
   <?php $n =1; do {  ?>
<tr class="rowTabla">
        <td width="17"><?php echo $n;?>. </td>
        <td width="130"><a href="reportes/contrato.php?id=<?php echo $row_detalles['idContrato'];?>" target="_blank"><?php echo $row_detalles['idContrato'];?></a></td>
        <td><?php echo $row_detalles['productoDes']; ?></td>
        <td align="right" style="padding-right:15px;"><?php echo $row_detalles['monto']; ?></td>
       
        <td align="center"> <?php if($_SESSION['tipoUsuario']==1){?> <a  href="javascript:void(0);" onClick="confirmLink('contratoElim.php?id=<?php echo $id; ?>&idContrato=<?php echo $row_detalles['idContrato']; ?>','¿Esta seguro que desea Eliminar este registro?',this)"><img src="images/iconos/trash.png" alt="Eliminar Contrato" width="16" height="16" border="0" align="absbottom" /></a> <?php } ?></td>
       
</tr>
    <?php $n = $n+1; } while ($row_detalles = mysql_fetch_assoc($detalles)); ?>
<tr class="rowTabla">
  <td colspan="5" align="center">&nbsp;</td>
  </tr>
 </table></form>
</div>
<?php }else{ ?>
<p><span style="text-align:center;" class="ui-widget-header">El cliente no posee contratos</span></p>
<?php }?>
</body>
</html>
